:mod:`pyglut` -- python opengl utilities
========================================

.. module:: pyglut

:platform: `Linux, Windows`
  
:synopsis: `pyopengl programming helper classes and functions set.`

.. moduleauthor:: Eddie Brüggemann <mrcyberfighter@gmail.com>

----------------
Plato polyhedron
----------------

++++
Cube
++++

.. class:: Cube(side_length,display_mode="lined",lines_color=False,faces_color=False,lines_width=1,display_ls=False)

  Generate an cube object with the given side length settings.
  
  :argument side_length: The side length of the cube sides.
  
  :argument display_mode: How to display the cube.
			    
			    * "lined" -> Only the lines will be displayed.
			    
			    * "faced" -> Only the faces will be displayed.
			    
			    * "twice" -> The lines and the faces will be displayed.
  
  :argument lines_color: An objet from type :obj:`Color` representing the lines color.
  
  :argument faces_color: The faces color(s).
			  
			  * An objet from type :obj:`Color` representing the faces color. 
			  
			  * An 6-items-list from objects from type :obj:`Color`. One item per cube face. 
  
  :argument lines_width: An integer representing the lines width.
  
  :argument display_ls: Define if the localview should be display.
  
.. method:: Cube.update_pos(matrix)

  Method to apply changing contains in the matrix argument on the cube object.
  
  :argument matrix: An object from type :obj:`Matrix` configurate to contains the wanted changings.
  
.. method:: Cube.display()

  Cube displaying method towards the settings.
  
.. method:: Cube.set_display_mode(display_mode)

  Change the polyhedron display mode. 
  
  :argument display_mode: can take as value:
                          
			    * "lined" -> Only the lines will be displayed.
			    
			    * "faced" -> Only the faces will be displayed.
			    
			    * "twice" -> The lines and the faces will be displayed.
			    
.. method:: Cube.set_lines_color(lines_color)

  Change the lines color from the polyhedron.
    
  :argument lines_color: An objet from type :obj:`Color` representing the lines color.
  
.. method:: Cube.set_faces_color(faces_color)

  Change the faces color(s) from the polyhedron.
        
  :argument faces_color: 
  
			  * An objet from type :obj:`Color` representing the faces color.
			 
			  * An 6-items-list from objects from type :obj:`Color`. One item per cube face.
			 
.. method:: Cube.set_lines_width(lines_width)

  Change the lines width from the polyhedron.
  
  :argument lines_width: An integer representing the lines width.
  
.. method:: Cube.set_display_ls(display_ls) :

  Change the Localview displaying setting.
  
  :argument display_ls: Define if the localview should be display.
  
.. method:: Cube.set_side_length(side_length) 

  Change the sides length from cube.
  
  :argument side_length: An float representing the cube sides length.
  
.. note:: **documenation**

  The Cube object has an private documentation display method: **Cube.__doc__()**